<?php
include("system/core/sessions.class.php");
include("system/core/promotion.class.php");
include("system/users/userAccess.class.php");
include("system/db/dbconnect.class.php");
include("system/display/navdisplay.class.php");
include("system/display/genericdisplay.class.php");
$GENDISPLAY = new Genericdisplay();
include("system/display/promodisplay.class.php");
include("system/config/config.php");

include("system/cart/cart.class.php");
$CART = new Cart();



$sess = new Session();

$nav = new Navdisplay();
$DISPLAY = new Promodisplay();

$user = new userAccess();
$user->isLoggedIn(1);

include("system/orders/order.class.php");
$ORDER = new Order();


$ORDER->createOrder($_POST);
$_SESSION['order'] = serialize($ORDER);

$genDisplay = new Genericdisplay();
$headerImage = $genDisplay->displayHeaderImage();

?>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="application/xhtml+xml; charset=iso-8859-1"  />
<meta name="description" content=""></meta>
<title>Confirm Your Order - <?php echo (SITENAME); ?> Toolbox</title>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1"  />
<script type="text/JavaScript" src="js/numberformat.js"></script>
<?php
?>
<style type="text/css" media="screen">	@import "styles/mainstyle.css"; </style>



<?php
if (isset($_SESSION['lob'])){
echo ("<link rel=\"stylesheet\" type=\"text/css\" href=\"styles/".$lob.".css\" />");
}
?>

<?php
if (isset($_SESSION['lob'])){
echo ("<link rel=\"stylesheet\" type=\"text/css\" href=\"styles/".$_SESSION['lob'].".css\" />");
}
?>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js"></script>

<!--[if IE]>
<link rel="stylesheet" type="text/css" href="styles/ie.css" />
<![endif]-->
</head>
<body>
<div id="wrapper">
	<div id="header">
	<div  id="homelink">
	
<a href="home.php">home</a>
<a href="contact.php">contact</a>
<a href="howtouse.php">how to use</a>

</div>
<div id="welcomeMessage">
<p>Welcome <?php echo $_SESSION['realname']; ?> <a href="logout.php">(logout)</a></p>
</div>

	
		<img src="images/<?php echo $headerImage; ?>" alt=""/>
	</div>
	
	<?php
	echo $CART->showMiniCart($_SESSION['username']);
	?>
	<div id="container">
		

		<div id="content" class="oneColumn">

		<div class="infobar">
		<h1><span class="numberdisplay">3</span> Confirm your order</h1>
		<p>Check your required quantities are correct or press back to amend.</p>
		</div>
			<?php
		
		
		
		echo ($ORDER->displayOrder()) ;
		$html .= "<table class=\"itemtable confirm\">";
	$html .= "<tr class=\"odd\">\n";
				$html .= "<td colspan=\"2\"><strong>\n";
				$html .= "<form action=\"addtocart.php\" method=\"post\">";
				$html .= "<input type=\"submit\" value=\"Add to cart\">";
				$html .= "</form>";
				$html .= "</td>\n";
				$html .= "</tr>";
	$html .= "</table>";
	
	echo($html);
		?>
		</div>
		
		
	</div>
	<div id="footer">
		<p>&copy; <?php echo (COPYRIGHT); ?> 2009</p>
	</div>
</div>
</body>
</html>